<?php
	require_once('vendor/autoload.php');

	use Omnipay\Omnipay;

	// Setup payment gateway
	$gateway = Omnipay::create('Mollie');
	$gateway->setApiKey('test_FfbbNpApf9NkQsMB5skgkkfa4Qn86z');

	$response = $gateway->purchase(
    [
        "amount" => "10.00",
        "currency" => "USD",
        "description" => "My first Payment",
        "returnUrl" => "https://web4theme.com/mollie-return.php"
    ]
	)->send();

	// Process response
	if ($response->isSuccessful()) {

	    // Payment was successful
	    print_r($response);

	} elseif ($response->isRedirect()) {

		//print_r($response);
		// Redirect to offsite payment gateway
	    $response->redirect();

	} else {

	    // Payment failed
	    echo $response->getMessage();
	}
